<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "template_map".
 *
 * @property string $template_name
 * @property string $layout_name
 */
class TemplateMap extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'template_map';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['template_name', 'layout_name'], 'required'],
            [['template_name'], 'string', 'max' => 64],
            [['layout_name'], 'string', 'max' => 32],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'template_name' => '模板文件名包括目录名称：如site&index',
            'layout_name' => '母版名称，如main',
        ];
    }
}
